home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr49 / 119_01.zip / SD-22.ASM < prev    next >
Assembly Source File  |  1993-06-16  |  4KB  |  100 lines

  1.  
  2. ;            SD.ASM ver 2.2
  3. ;           (revised 6/5/81)
  4. ;
  5. ;        SUPER DIRECTORY PROGRAM
  6. ;          by Bruce R. Ratoff
  7. ;
  8. ;Displays the directory of a CP/M disk, sorted alphabetically,
  9. ;with the file size in K, rounded to the nearest CP/M block size.
  10. ;
  11. ;This latest variation on a common theme will automatically adjust
  12. ;itself for any block size and directory length under CP/M 1.4 or 2.x
  13. ;or MP/M (any version).  If the screen fills, program will pause until
  14. ;a key is struck (see NPL and LPS equates below).  Total space used
  15. ;and number of files are printed at end.
  16. ;
  17. ;Command: SD FILENAME.FILETYPE or just SD
  18. ;
  19. ;Allows '*' or '?' type specifications.  Drive name may also be
  20. ;specified.  Ignores "SYS" files unless SOPT is TRUE and 'S' option
  21. ;is given (i.e., SD *.* S will print all files).
  22. ;
  23. ;==============================================================
  24. ;
  25. ;Fixes/updates (in reverse order to minimize reading time):
  26. ;
  27. ;06/05/81 Added PGPAWZ (page pause) conditional for remote
  28. ;      CP/M systems where pausing may not be wanted.
  29. ;      Setting PGPAWZ and REPSIZ to FALSE will result in
  30. ;      a display like DIR, but sorted and with the stat
  31. ;      of space remaining.  Rearranged equates to allow
  32. ;      15 lines per page when narrow display is chosen.
  33. ;      (KBP)
  34. ;
  35. ;06/01/81 Added version number, restored CTL-C break, added
  36. ;      CTL-C test to allow break at page pause, added
  37. ;      routine to gobble up any waiting console character
  38. ;      at EXIT, added conditional assembly to allow no
  39. ;      report of file sizes, added conditional assembly
  40. ;      for direct console I/O for remote CP/M systems
  41. ;      where phone line noise would garbage display.  (KBP)
  42. ;
  43. ;05/06/81 Corrected double printing of drive name in CALLB.
  44. ;      Error only occurred with narrow display when file
  45. ;      wasn't found. (Tim Nicholas)
  46. ;
  47. ;02/06/81 Changed sort to have odd gap (K+P say its faster)
  48. ;
  49. ;01/06/80 Changed sort from bubble sort to shell sort
  50. ;      for faster speed.
  51. ;
  52. ;12/24/80 Changed BIOS conout to BDOS conout to allow
  53. ;      printing of directory with CTL-P.  Also added
  54. ;      print of remaining space even if file not
  55. ;      found. (Steve Nossen)
  56. ;
  57. ;12/15/80 Added space suppression when printing file
  58. ;      totals.  (KBP)
  59. ;
  60. ;12/14/80 Added logic to print space remaining on disk.
  61. ;      Changed ^C test so that interrupting character is
  62. ;      not echoed (makes remote use cleaner).  (BRR)
  63. ;
  64. ;12/02/80 Fixed bug in print routine which compared last file
  65. ;      against garbage before printing. (BRR)
  66. ;
  67. ;11/29/80 Changed to allow printing 4 file names. (Ben Bronson
  68. ;      and Keith Petersen)
  69. ;
  70. ;11/22/80 Fixed bug in handling >256 files.  Changed abort test
  71. ;      in print routine to only abort on control-c.  (BRR)
  72. ;
  73. ;Based on 'DIRS' by Keith Petersen, W8SDZ
  74. ;
  75. ;NOTE: If you add improvements or otherwise update
  76. ;this program, please modem a copy of the new file
  77. ;to "TECHNICAL CBBS" in Dearborn, Michigan - phone
  78. ;313-846-6127 (110, 300, 450 or 600 baud).  Use the
  79. ;filename SD-NEW.NEW. (KBP)
  80. ;
  81. ;Set 'RMAC' TRUE to assemble with relocating assembler
  82. ;(requires link with PAGE 0 equates in separate file).
  83. ;
  84. ;==============================================================
  85. ;
  86. FALSE    EQU    0      ;DEFINE LOGICAL FALSE
  87. TRUE    EQU    NOT FALSE ;DEFINE LOGICAL TRUE
  88. ;
  89. ALTCPM    EQU    FALSE    ;PUT TRUE HERE FOR H8 OR TRS-80
  90. RMAC    EQU    FALSE    ;PUT TRUE HERE FOR ASSEMBLY BY RMAC
  91. SOPT    EQU    TRUE     ;PUT TRUE TO ALLOW 'SD *.* S' FORM
  92. WIDE    EQU    TRUE     ;PUT TRUE TO ALLOW 4 NAMES ACROSS
  93. REPSIZ    EQU    TRUE     ;PUT TRUE TO REPORT FILE SIZES
  94. PGPAWZ    EQU    TRUE     ;PUT TRUE FOR PAUSE AFTER EACH PAGE
  95. DIRCON    EQU    FALSE    ;PUT TRUE FOR DIRECT CONSOLE OUTPUT
  96. ;
  97. DELIM    EQU    ':'    ;FENCE (DELIMITER) CHARACTER
  98. ;
  99.     IF    WIDE
  100. NPL    EQU    4    ;NUMBER OF NAMES